﻿<UserControl x:Class="DeltaGroup.WheelOfJeopardy.UI.Screens.ChallengeBlock"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:boardUI="clr-namespace:DeltaGroup.WheelOfJeopardy.UI.Converters" mc:Ignorable="d" 
	         d:DesignWidth="110" d:DesignHeight="110" Width="80" Height="80" MouseLeftButtonUp="ChallengeBlock_MouseLeftButtonUp">
    <UserControl.Resources>
        <boardUI:PointVisibilityConverter x:Key="PointVisibilityConverter" />
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot">
        <Rectangle x:Name="ChallengeBackground" Height="80" Stroke="#FF0D115F" Width="80" StrokeThickness="2" RadiusY="14" RadiusX="14">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0.043,0.058" StartPoint="1.198,1.283">
                    <GradientStop Color="#FF000143" Offset="0"/>
                    <GradientStop Color="#FF333EB1" Offset="1"/>
                    <GradientStop Color="#FF262E95" Offset="0.474"/>
                    <GradientStop Color="#FF151A72" Offset="0.159"/>
                    <GradientStop Color="#FF2E38A7" Offset="0.759"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <TextBlock x:Name="PointTextBlock" Visibility="{Binding Path=IsChallenged, Converter={StaticResource PointVisibilityConverter}, BindsDirectlyToSource=True}" TextWrapping="Wrap" Text="{Binding Path=Point, BindsDirectlyToSource=True}" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" ScrollViewer.VerticalScrollBarVisibility="Disabled" TextAlignment="Center">
			<TextBlock.Foreground>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FFFFE4A7" Offset="0"/>
					<GradientStop Color="White" Offset="1"/>
					<GradientStop Color="#FEFEE5AB" Offset="0.78"/>
				</LinearGradientBrush>
			</TextBlock.Foreground>
        </TextBlock>
    </Grid>
</UserControl>

